<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的名片</title>
    <META  HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="app-mobile-web-app-capable" content="yes" />
    <meta name="app-mobile-web-app-status-bar-style" content="black-translucent" />
    <link rel="stylesheet" href="//at.alicdn.com/t/font_772560_fv2bjdy3lkf.css">
    <link rel="stylesheet" href="css/mine-card.css">
    <script src="js/jquery.min.js"></script>
</head>
<body>

<div class="wrap">
    <div class="content-wrap bg-white">
        <div class="card">
            <div class="flex row-reverse">
                <div class="flex align ">
                    <div class="logo">
                        <img src="" alt="" id="logo">
                    </div>
                    <div class="company" id="company">成都易活动官网名片</div>
                </div>
            </div>
            <div class="flex align">
                <div class="head-pic">
                    <img src="" alt="" id="headPic">
                </div>
                <div class="basic-info" id="basicInfo">

                </div>
            </div>
            <div class="other-info" id="otherInfo">

            </div>
        </div>
        <div class="qr-box flex align">
            <div class="qr">
                <img src="" alt="" id="cardQr">
            </div>
        </div>
        <p class="qr-tips">长按查看小程序名片</p>
    </div>

</div>
<script>
    $(document).ready(function () {
        $.ajax({
            url: 'https://qyim.ec51.com/v1/check/qr-card',
            method: 'post',
            data: {
                id: sessionStorage.getItem('login_identifier')
            },
            datatype: 'json',
            success: function (res) {
                $('#logo').attr('src',res.data.company.logo);
                $('#company').html(res.data.company.name);
                $('#headPic').attr('src',res.data.avatar);
                $('#basicInfo').html('<p class="name">'+res.data.name+'</p><p class="job">'+res.data.position+'</p>');
                $('#otherInfo').html('<p class="info-item flex align">\n' +
                    '                    <i class="ra ra-dianhua"></i>\n' +
                    '                    <span>'+res.data.mobile+'</span>\n' +
                    '                </p>\n' +
                    '                <p class="info-item flex align">\n' +
                    '                    <i class="ra ra-youxiang1"></i>\n' +
                    '                    <span>'+res.data.email+'</span>\n' +
                    '                </p>\n' +
                    '                <p class="info-item flex align">\n' +
                    '                    <i class="ra ra-dizhi"></i>\n' +
                    '                    <span>'+res.data.address+'</span>\n' +
                    '                </p>');
                $('#cardQr').attr('src',res.data.qr_code);
            }
        })
    });
</script>
</body>
</html>